package com.example.wxchatdemo.Sockets;

import android.view.View;
import android.widget.ListView;
import android.widget.Toast;

import com.example.wxchatdemo.speackActivity2;
import com.example.wxchatdemo.speacking;
import com.example.wxchatdemo.speackingAdapter;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.LinkedList;
import java.util.Locale;
import java.util.Random;
import java.util.Scanner;

//socket的连接请求
public class TestClient2 {
    private Socket socket;
    private InputStream is;
    private OutputStream os;
    private String response = "";
    private Scanner scanner;
    private  String msgs;


    public String getMsgs() {
        return msgs;
    }

    public void setMsgs(String msgs) {
        this.msgs = msgs;
    }

    public void init() throws IOException {
        try {
            socket = new Socket("100.2.182.47",8888);
            is = socket.getInputStream();
            os = socket.getOutputStream();
        } catch (IOException e) {
            System.out.println("socket在speacket2的线程里失败====608");

        }
        response = IOUtil.readString(is);

    }

    public static void main(String[] args) throws IOException {
        TestClient2 testClient2=new TestClient2();
        testClient2.init();
    }



}
